<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Safe #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE TypeOperators #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  Control.Monad.Zip</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   :  (c) Nils Schweinsberg 2011,</span><span>
</span><span id="line-8"></span><span class="hs-comment">--                (c) George Giorgidze 2011</span><span>
</span><span id="line-9"></span><span class="hs-comment">--                (c) University Tuebingen 2011</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Stability   :  experimental</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Monadic zipping (used for monad comprehensions)</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Control.Monad.Zip</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Monad.html"><span class="hs-identifier">Control.Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#liftM"><span class="hs-identifier">liftM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#liftM2"><span class="hs-identifier">liftM2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Functor.Identity.html"><span class="hs-identifier">Data.Functor.Identity</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Monoid.html"><span class="hs-identifier">Data.Monoid</span></a></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Ord.html"><span class="hs-identifier">Data.Ord</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Data.Ord.html#Down"><span class="hs-identifier">Down</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Proxy.html"><span class="hs-identifier">Data.Proxy</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Data.List.NonEmpty.html"><span class="hs-identifier">Data.List.NonEmpty</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">NE</span></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Generics.html"><span class="hs-identifier">GHC.Generics</span></a></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Tuple.html#"><span class="hs-identifier">GHC.Tuple</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Tuple.html#Solo"><span class="hs-identifier">Solo</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span class="hs-comment">-- | Instances should satisfy the laws:</span><span>
</span><span id="line-31"></span><span class="hs-comment">--</span><span>
</span><span id="line-32"></span><span class="hs-comment">-- [Naturality]</span><span>
</span><span id="line-33"></span><span class="hs-comment">--</span><span>
</span><span id="line-34"></span><span class="hs-comment">--     @'liftM' (f 'Control.Arrow.***' g) ('mzip' ma mb)</span><span>
</span><span id="line-35"></span><span class="hs-comment">--         = 'mzip' ('liftM' f ma) ('liftM' g mb)@</span><span>
</span><span id="line-36"></span><span class="hs-comment">--</span><span>
</span><span id="line-37"></span><span class="hs-comment">-- [Information Preservation]</span><span>
</span><span id="line-38"></span><span class="hs-comment">--</span><span>
</span><span id="line-39"></span><span class="hs-comment">--     @'liftM' ('Prelude.const' ()) ma = 'liftM' ('Prelude.const' ()) mb@</span><span>
</span><span id="line-40"></span><span class="hs-comment">--         implies</span><span>
</span><span id="line-41"></span><span class="hs-comment">--     @'munzip' ('mzip' ma mb) = (ma, mb)@</span><span>
</span><span id="line-42"></span><span class="hs-comment">--</span><span>
</span><span id="line-43"></span><span class="hs-keyword">class</span><span> </span><span class="annot"><a href="GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567896"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span id="MonadZip"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-var">MonadZip</span></a></span></span><span> </span><span id="local-6989586621679567896"><span class="annot"><a href="#local-6989586621679567896"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-44"></span><span>    </span><span class="hs-pragma">{-# MINIMAL</span><span> </span><span class="annot"><a href="Control.Monad.Zip.html#mzip"><span class="hs-pragma hs-type">mzip</span></a></span><span> </span><span class="hs-pragma">|</span><span> </span><span class="annot"><a href="Control.Monad.Zip.html#mzipWith"><span class="hs-pragma hs-type">mzipWith</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span>    </span><span id="local-6989586621679567894"><span id="local-6989586621679567895"><span id="mzip"><span class="annot"><a href="Control.Monad.Zip.html#mzip"><span class="hs-identifier hs-type">mzip</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679567896"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567895"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679567896"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567894"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679567896"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679567895"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679567894"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-47"></span><span>    </span><span id="local-6989586621679567699"><span class="annot"><a href="Control.Monad.Zip.html#mzip"><span class="hs-identifier hs-var hs-var">mzip</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; (a, b)) -&gt; m a -&gt; m b -&gt; m (a, b)
forall (m :: * -&gt; *) a b c.
MonadZip m =&gt;
(a -&gt; b -&gt; c) -&gt; m a -&gt; m b -&gt; m c
</span><a href="Control.Monad.Zip.html#mzipWith"><span class="hs-identifier hs-var">mzipWith</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">)</span></span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span>    </span><span id="local-6989586621679567889"><span id="local-6989586621679567890"><span id="local-6989586621679567891"><span id="mzipWith"><span class="annot"><a href="Control.Monad.Zip.html#mzipWith"><span class="hs-identifier hs-type">mzipWith</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679567891"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679567890"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679567889"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679567896"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567891"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679567896"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567890"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679567896"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567889"><span class="hs-identifier hs-type">c</span></a></span></span></span></span><span>
</span><span id="line-50"></span><span>    </span><span id="local-6989586621679567697"><span class="annot"><a href="Control.Monad.Zip.html#mzipWith"><span class="hs-identifier hs-var hs-var">mzipWith</span></a></span><span> </span><span id="local-6989586621679567693"><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679567693"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679567692"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679567692"><span class="hs-identifier hs-var">ma</span></a></span></span><span> </span><span id="local-6989586621679567691"><span class="annot"><span class="annottext">m b
</span><a href="#local-6989586621679567691"><span class="hs-identifier hs-var">mb</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((a, b) -&gt; c) -&gt; m (a, b) -&gt; m c
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; (a, b) -&gt; c
forall a b c. (a -&gt; b -&gt; c) -&gt; (a, b) -&gt; c
</span><a href="Data.Tuple.html#uncurry"><span class="hs-identifier hs-var">uncurry</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679567693"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">m a -&gt; m b -&gt; m (a, b)
forall (m :: * -&gt; *) a b. MonadZip m =&gt; m a -&gt; m b -&gt; m (a, b)
</span><a href="Control.Monad.Zip.html#mzip"><span class="hs-identifier hs-var">mzip</span></a></span><span> </span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679567692"><span class="hs-identifier hs-var">ma</span></a></span><span> </span><span class="annot"><span class="annottext">m b
</span><a href="#local-6989586621679567691"><span class="hs-identifier hs-var">mb</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span>    </span><span id="local-6989586621679567876"><span id="local-6989586621679567877"><span id="munzip"><span class="annot"><a href="Control.Monad.Zip.html#munzip"><span class="hs-identifier hs-type">munzip</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679567896"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679567877"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679567876"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679567896"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567877"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679567896"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567876"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-53"></span><span>    </span><span id="local-6989586621679567688"><span class="annot"><a href="Control.Monad.Zip.html#munzip"><span class="hs-identifier hs-var hs-var">munzip</span></a></span><span> </span><span id="local-6989586621679567684"><span class="annot"><span class="annottext">m (a, b)
</span><a href="#local-6989586621679567684"><span class="hs-identifier hs-var">mab</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((a, b) -&gt; a) -&gt; m (a, b) -&gt; m a
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="annot"><span class="annottext">(a, b) -&gt; a
forall a b. (a, b) -&gt; a
</span><a href="Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">m (a, b)
</span><a href="#local-6989586621679567684"><span class="hs-identifier hs-var">mab</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">((a, b) -&gt; b) -&gt; m (a, b) -&gt; m b
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="annot"><span class="annottext">(a, b) -&gt; b
forall a b. (a, b) -&gt; b
</span><a href="Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">m (a, b)
</span><a href="#local-6989586621679567684"><span class="hs-identifier hs-var">mab</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-54"></span><span>    </span><span class="hs-comment">-- munzip is a member of the class because sometimes</span><span>
</span><span id="line-55"></span><span>    </span><span class="hs-comment">-- you can implement it more efficiently than the</span><span>
</span><span id="line-56"></span><span>    </span><span class="hs-comment">-- above default code.  See #4370 comment by giorgidze</span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span class="hs-comment">-- | @since 4.3.1.0</span><span>
</span><span id="line-59"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-60"></span><span>    </span><span id="local-6989586621679567675"><span class="annot"><span class="annottext">mzip :: forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="Control.Monad.Zip.html#mzip"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzip</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [b] -&gt; [(a, b)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span>
</span><span id="line-61"></span><span>    </span><span id="local-6989586621679567674"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
</span><a href="#local-6989586621679567674"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
forall a b c. (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
</span><a href="GHC.List.html#zipWith"><span class="hs-identifier hs-var">zipWith</span></a></span><span>
</span><span id="line-62"></span><span>    </span><span id="local-6989586621679567672"><span class="annot"><span class="annottext">munzip :: forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="#local-6989586621679567672"><span class="hs-identifier hs-var hs-var hs-var hs-var">munzip</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(a, b)] -&gt; ([a], [b])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span>
</span><span id="line-63"></span><span>
</span><span id="line-64"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-65"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="GHC.Base.html#NonEmpty"><span class="hs-identifier hs-type">NE.NonEmpty</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-66"></span><span>  </span><span id="local-6989586621679567663"><span class="annot"><span class="annottext">mzip :: forall a b. NonEmpty a -&gt; NonEmpty b -&gt; NonEmpty (a, b)
</span><a href="Control.Monad.Zip.html#mzip"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzip</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NonEmpty a -&gt; NonEmpty b -&gt; NonEmpty (a, b)
forall a b. NonEmpty a -&gt; NonEmpty b -&gt; NonEmpty (a, b)
</span><a href="Data.List.NonEmpty.html#zip"><span class="hs-identifier hs-var">NE.zip</span></a></span><span>
</span><span id="line-67"></span><span>  </span><span id="local-6989586621679567661"><span class="annot"><span class="annottext">mzipWith :: forall a b c.
(a -&gt; b -&gt; c) -&gt; NonEmpty a -&gt; NonEmpty b -&gt; NonEmpty c
</span><a href="#local-6989586621679567661"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; NonEmpty a -&gt; NonEmpty b -&gt; NonEmpty c
forall a b c.
(a -&gt; b -&gt; c) -&gt; NonEmpty a -&gt; NonEmpty b -&gt; NonEmpty c
</span><a href="Data.List.NonEmpty.html#zipWith"><span class="hs-identifier hs-var">NE.zipWith</span></a></span><span>
</span><span id="line-68"></span><span>  </span><span id="local-6989586621679567657"><span class="annot"><span class="annottext">munzip :: forall a b. NonEmpty (a, b) -&gt; (NonEmpty a, NonEmpty b)
</span><a href="#local-6989586621679567657"><span class="hs-identifier hs-var hs-var hs-var hs-var">munzip</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NonEmpty (a, b) -&gt; (NonEmpty a, NonEmpty b)
forall (f :: * -&gt; *) a b. Functor f =&gt; f (a, b) -&gt; (f a, f b)
</span><a href="Data.List.NonEmpty.html#unzip"><span class="hs-identifier hs-var">NE.unzip</span></a></span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-71"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567651"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="Data.Functor.Identity.html#Identity"><span class="hs-identifier hs-type">Identity</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-72"></span><span>    </span><span id="local-6989586621679567647"><span class="annot"><span class="annottext">mzipWith :: forall a b c.
(a -&gt; b -&gt; c) -&gt; Identity a -&gt; Identity b -&gt; Identity c
</span><a href="#local-6989586621679567647"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; Identity a -&gt; Identity b -&gt; Identity c
forall (m :: * -&gt; *) a1 a2 r.
Monad m =&gt;
(a1 -&gt; a2 -&gt; r) -&gt; m a1 -&gt; m a2 -&gt; m r
</span><a href="GHC.Base.html#liftM2"><span class="hs-identifier hs-var">liftM2</span></a></span><span>
</span><span id="line-73"></span><span>    </span><span id="local-6989586621679567646"><span class="annot"><span class="annottext">munzip :: forall a b. Identity (a, b) -&gt; (Identity a, Identity b)
</span><a href="#local-6989586621679567646"><span class="hs-identifier hs-var hs-var hs-var hs-var">munzip</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Identity.html#Identity"><span class="hs-identifier hs-type">Identity</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679567644"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679567644"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679567643"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679567643"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Identity a
forall a. a -&gt; Identity a
</span><a href="Data.Functor.Identity.html#Identity"><span class="hs-identifier hs-var">Identity</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679567644"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b -&gt; Identity b
forall a. a -&gt; Identity a
</span><a href="Data.Functor.Identity.html#Identity"><span class="hs-identifier hs-var">Identity</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679567643"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span class="hs-comment">-- | @since 4.15.0.0</span><span>
</span><span id="line-76"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567638"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Tuple.html#Solo"><span class="hs-identifier hs-type">Solo</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-77"></span><span>    </span><span id="local-6989586621679567634"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; Solo a -&gt; Solo b -&gt; Solo c
</span><a href="#local-6989586621679567634"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; Solo a -&gt; Solo b -&gt; Solo c
forall (m :: * -&gt; *) a1 a2 r.
Monad m =&gt;
(a1 -&gt; a2 -&gt; r) -&gt; m a1 -&gt; m a2 -&gt; m r
</span><a href="GHC.Base.html#liftM2"><span class="hs-identifier hs-var">liftM2</span></a></span><span>
</span><span id="line-78"></span><span>    </span><span id="local-6989586621679567633"><span class="annot"><span class="annottext">munzip :: forall a b. Solo (a, b) -&gt; (Solo a, Solo b)
</span><a href="#local-6989586621679567633"><span class="hs-identifier hs-var hs-var hs-var hs-var">munzip</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Tuple.html#Solo"><span class="hs-identifier hs-type">Solo</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679567632"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679567632"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679567631"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679567631"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Solo a
forall a. a -&gt; Solo a
</span><a href="../../ghc-prim/src/GHC.Tuple.html#Solo"><span class="hs-identifier hs-var">Solo</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679567632"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b -&gt; Solo b
forall a. a -&gt; Solo a
</span><a href="../../ghc-prim/src/GHC.Tuple.html#Solo"><span class="hs-identifier hs-var">Solo</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679567631"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-81"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567623"><span id="local-6989586621679567626"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="Data.Semigroup.Internal.html#Dual"><span class="hs-identifier hs-type">Dual</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-82"></span><span>    </span><span class="hs-comment">-- Cannot use coerce, it's unsafe</span><span>
</span><span id="line-83"></span><span>    </span><span id="local-6989586621679567621"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; Dual a -&gt; Dual b -&gt; Dual c
</span><a href="#local-6989586621679567621"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; Dual a -&gt; Dual b -&gt; Dual c
forall (m :: * -&gt; *) a1 a2 r.
Monad m =&gt;
(a1 -&gt; a2 -&gt; r) -&gt; m a1 -&gt; m a2 -&gt; m r
</span><a href="GHC.Base.html#liftM2"><span class="hs-identifier hs-var">liftM2</span></a></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-86"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567613"><span id="local-6989586621679567616"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="Data.Semigroup.Internal.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-87"></span><span>    </span><span id="local-6989586621679567611"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; Sum a -&gt; Sum b -&gt; Sum c
</span><a href="#local-6989586621679567611"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; Sum a -&gt; Sum b -&gt; Sum c
forall (m :: * -&gt; *) a1 a2 r.
Monad m =&gt;
(a1 -&gt; a2 -&gt; r) -&gt; m a1 -&gt; m a2 -&gt; m r
</span><a href="GHC.Base.html#liftM2"><span class="hs-identifier hs-var">liftM2</span></a></span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-90"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567603"><span id="local-6989586621679567606"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="Data.Semigroup.Internal.html#Product"><span class="hs-identifier hs-type">Product</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-91"></span><span>    </span><span id="local-6989586621679567601"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; Product a -&gt; Product b -&gt; Product c
</span><a href="#local-6989586621679567601"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; Product a -&gt; Product b -&gt; Product c
forall (m :: * -&gt; *) a1 a2 r.
Monad m =&gt;
(a1 -&gt; a2 -&gt; r) -&gt; m a1 -&gt; m a2 -&gt; m r
</span><a href="GHC.Base.html#liftM2"><span class="hs-identifier hs-var">liftM2</span></a></span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-94"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567593"><span id="local-6989586621679567596"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-95"></span><span>    </span><span id="local-6989586621679567591"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; Maybe a -&gt; Maybe b -&gt; Maybe c
</span><a href="#local-6989586621679567591"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; Maybe a -&gt; Maybe b -&gt; Maybe c
forall (m :: * -&gt; *) a1 a2 r.
Monad m =&gt;
(a1 -&gt; a2 -&gt; r) -&gt; m a1 -&gt; m a2 -&gt; m r
</span><a href="GHC.Base.html#liftM2"><span class="hs-identifier hs-var">liftM2</span></a></span><span>
</span><span id="line-96"></span><span>
</span><span id="line-97"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-98"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567583"><span id="local-6989586621679567586"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="Data.Monoid.html#First"><span class="hs-identifier hs-type">First</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-99"></span><span>    </span><span id="local-6989586621679567581"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; First a -&gt; First b -&gt; First c
</span><a href="#local-6989586621679567581"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; First a -&gt; First b -&gt; First c
forall (m :: * -&gt; *) a1 a2 r.
Monad m =&gt;
(a1 -&gt; a2 -&gt; r) -&gt; m a1 -&gt; m a2 -&gt; m r
</span><a href="GHC.Base.html#liftM2"><span class="hs-identifier hs-var">liftM2</span></a></span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-102"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567573"><span id="local-6989586621679567576"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="Data.Monoid.html#Last"><span class="hs-identifier hs-type">Last</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-103"></span><span>    </span><span id="local-6989586621679567571"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; Last a -&gt; Last b -&gt; Last c
</span><a href="#local-6989586621679567571"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; Last a -&gt; Last b -&gt; Last c
forall (m :: * -&gt; *) a1 a2 r.
Monad m =&gt;
(a1 -&gt; a2 -&gt; r) -&gt; m a1 -&gt; m a2 -&gt; m r
</span><a href="GHC.Base.html#liftM2"><span class="hs-identifier hs-var">liftM2</span></a></span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-106"></span><span id="local-6989586621679567817"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567563"><span id="local-6989586621679567566"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567817"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Semigroup.Internal.html#Alt"><span class="hs-identifier hs-type">Alt</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567817"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-107"></span><span>    </span><span id="local-6989586621679567561"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; Alt f a -&gt; Alt f b -&gt; Alt f c
</span><a href="#local-6989586621679567561"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span id="local-6989586621679567560"><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679567560"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Semigroup.Internal.html#Alt"><span class="hs-identifier hs-type">Alt</span></a></span><span> </span><span id="local-6989586621679567558"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679567558"><span class="hs-identifier hs-var">ma</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Semigroup.Internal.html#Alt"><span class="hs-identifier hs-type">Alt</span></a></span><span> </span><span id="local-6989586621679567557"><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679567557"><span class="hs-identifier hs-var">mb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f c -&gt; Alt f c
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Alt f a
</span><a href="Data.Semigroup.Internal.html#Alt"><span class="hs-identifier hs-var">Alt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; f a -&gt; f b -&gt; f c
forall (m :: * -&gt; *) a b c.
MonadZip m =&gt;
(a -&gt; b -&gt; c) -&gt; m a -&gt; m b -&gt; m c
</span><a href="Control.Monad.Zip.html#mzipWith"><span class="hs-identifier hs-var">mzipWith</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679567560"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679567558"><span class="hs-identifier hs-var">ma</span></a></span><span> </span><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679567557"><span class="hs-identifier hs-var">mb</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-110"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567549"><span id="local-6989586621679567552"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="Data.Proxy.html#Proxy"><span class="hs-identifier hs-type">Proxy</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-111"></span><span>    </span><span id="local-6989586621679567548"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; Proxy a -&gt; Proxy b -&gt; Proxy c
</span><a href="#local-6989586621679567548"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Proxy a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Proxy b
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Proxy c
forall {k} (t :: k). Proxy t
</span><a href="Data.Proxy.html#Proxy"><span class="hs-identifier hs-var">Proxy</span></a></span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="hs-comment">-- Instances for GHC.Generics</span><span>
</span><span id="line-114"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-115"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567539"><span id="local-6989586621679567542"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#U1"><span class="hs-identifier hs-type">U1</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-116"></span><span>    </span><span id="local-6989586621679567538"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; U1 a -&gt; U1 b -&gt; U1 c
</span><a href="#local-6989586621679567538"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">U1 a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">U1 b
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">U1 c
forall k (p :: k). U1 p
</span><a href="GHC.Generics.html#U1"><span class="hs-identifier hs-var">U1</span></a></span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-119"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567529"><span id="local-6989586621679567532"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#Par1"><span class="hs-identifier hs-type">Par1</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-120"></span><span>    </span><span id="local-6989586621679567527"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; Par1 a -&gt; Par1 b -&gt; Par1 c
</span><a href="#local-6989586621679567527"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; Par1 a -&gt; Par1 b -&gt; Par1 c
forall (m :: * -&gt; *) a1 a2 r.
Monad m =&gt;
(a1 -&gt; a2 -&gt; r) -&gt; m a1 -&gt; m a2 -&gt; m r
</span><a href="GHC.Base.html#liftM2"><span class="hs-identifier hs-var">liftM2</span></a></span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-123"></span><span id="local-6989586621679567796"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567519"><span id="local-6989586621679567522"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567796"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#Rec1"><span class="hs-identifier hs-type">Rec1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567796"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-124"></span><span>    </span><span id="local-6989586621679567517"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; Rec1 f a -&gt; Rec1 f b -&gt; Rec1 f c
</span><a href="#local-6989586621679567517"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span id="local-6989586621679567516"><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679567516"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#Rec1"><span class="hs-identifier hs-type">Rec1</span></a></span><span> </span><span id="local-6989586621679567514"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679567514"><span class="hs-identifier hs-var">fa</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#Rec1"><span class="hs-identifier hs-type">Rec1</span></a></span><span> </span><span id="local-6989586621679567513"><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679567513"><span class="hs-identifier hs-var">fb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f c -&gt; Rec1 f c
forall k (f :: k -&gt; *) (p :: k). f p -&gt; Rec1 f p
</span><a href="GHC.Generics.html#Rec1"><span class="hs-identifier hs-var">Rec1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; f a -&gt; f b -&gt; f c
forall (m :: * -&gt; *) a b c.
MonadZip m =&gt;
(a -&gt; b -&gt; c) -&gt; m a -&gt; m b -&gt; m c
</span><a href="Control.Monad.Zip.html#mzipWith"><span class="hs-identifier hs-var">mzipWith</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679567516"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679567514"><span class="hs-identifier hs-var">fa</span></a></span><span> </span><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679567513"><span class="hs-identifier hs-var">fb</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-127"></span><span id="local-6989586621679567783"><span id="local-6989586621679567784"><span id="local-6989586621679567785"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567505"><span id="local-6989586621679567508"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567785"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#M1"><span class="hs-identifier hs-type">M1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567784"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567783"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567785"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-128"></span><span>    </span><span id="local-6989586621679567503"><span class="annot"><span class="annottext">mzipWith :: forall a b c.
(a -&gt; b -&gt; c) -&gt; M1 i c f a -&gt; M1 i c f b -&gt; M1 i c f c
</span><a href="#local-6989586621679567503"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span id="local-6989586621679567502"><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679567502"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#M1"><span class="hs-identifier hs-type">M1</span></a></span><span> </span><span id="local-6989586621679567500"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679567500"><span class="hs-identifier hs-var">fa</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#M1"><span class="hs-identifier hs-type">M1</span></a></span><span> </span><span id="local-6989586621679567499"><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679567499"><span class="hs-identifier hs-var">fb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f c -&gt; M1 i c f c
forall k i (c :: Meta) (f :: k -&gt; *) (p :: k). f p -&gt; M1 i c f p
</span><a href="GHC.Generics.html#M1"><span class="hs-identifier hs-var">M1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; f a -&gt; f b -&gt; f c
forall (m :: * -&gt; *) a b c.
MonadZip m =&gt;
(a -&gt; b -&gt; c) -&gt; m a -&gt; m b -&gt; m c
</span><a href="Control.Monad.Zip.html#mzipWith"><span class="hs-identifier hs-var">mzipWith</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679567502"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679567500"><span class="hs-identifier hs-var">fa</span></a></span><span> </span><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679567499"><span class="hs-identifier hs-var">fb</span></a></span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-131"></span><span id="local-6989586621679567771"><span id="local-6989586621679567772"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567491"><span id="local-6989586621679567494"><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567772"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567771"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679567772"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679567771"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-132"></span><span>    </span><span id="local-6989586621679567488"><span class="annot"><span class="annottext">mzipWith :: forall a b c.
(a -&gt; b -&gt; c) -&gt; (:*:) f g a -&gt; (:*:) f g b -&gt; (:*:) f g c
</span><a href="#local-6989586621679567488"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span id="local-6989586621679567487"><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679567487"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679567486"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679567486"><span class="hs-identifier hs-var">x1</span></a></span></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span> </span><span id="local-6989586621679567484"><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679567484"><span class="hs-identifier hs-var">y1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679567483"><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679567483"><span class="hs-identifier hs-var">x2</span></a></span></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span> </span><span id="local-6989586621679567482"><span class="annot"><span class="annottext">g b
</span><a href="#local-6989586621679567482"><span class="hs-identifier hs-var">y2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; f a -&gt; f b -&gt; f c
forall (m :: * -&gt; *) a b c.
MonadZip m =&gt;
(a -&gt; b -&gt; c) -&gt; m a -&gt; m b -&gt; m c
</span><a href="Control.Monad.Zip.html#mzipWith"><span class="hs-identifier hs-var">mzipWith</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679567487"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679567486"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679567483"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">f c -&gt; g c -&gt; (:*:) f g c
forall k (f :: k -&gt; *) (g :: k -&gt; *) (p :: k).
f p -&gt; g p -&gt; (:*:) f g p
</span><a href="GHC.Generics.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; g a -&gt; g b -&gt; g c
forall (m :: * -&gt; *) a b c.
MonadZip m =&gt;
(a -&gt; b -&gt; c) -&gt; m a -&gt; m b -&gt; m c
</span><a href="Control.Monad.Zip.html#mzipWith"><span class="hs-identifier hs-var">mzipWith</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679567487"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679567484"><span class="hs-identifier hs-var">y1</span></a></span><span> </span><span class="annot"><span class="annottext">g b
</span><a href="#local-6989586621679567482"><span class="hs-identifier hs-var">y2</span></a></span></span></span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span class="hs-comment">-- instances for Data.Ord</span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span class="hs-comment">-- | @since 4.12.0.0</span><span>
</span><span id="line-137"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679567474"><span id="local-6989586621679567477"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="Data.Ord.html#Down"><span class="hs-identifier hs-type">Down</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-138"></span><span>    </span><span id="local-6989586621679567472"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; Down a -&gt; Down b -&gt; Down c
</span><a href="#local-6989586621679567472"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; Down a -&gt; Down b -&gt; Down c
forall (m :: * -&gt; *) a1 a2 r.
Monad m =&gt;
(a1 -&gt; a2 -&gt; r) -&gt; m a1 -&gt; m a2 -&gt; m r
</span><a href="GHC.Base.html#liftM2"><span class="hs-identifier hs-var">liftM2</span></a></span><span>
</span><span id="line-139"></span></pre></body></html>